Skip to content

Guard snapshot process signals in GUI#2457

Draft
Ajeem-git wants to merge 3 commits into
bit-team:devfrom
Ajeem-git:issue-1604-process-lookup-guard
Draft

Guard snapshot process signals in GUI#2457
Ajeem-git wants to merge 3 commits into
bit-team:devfrom
Ajeem-git:issue-1604-process-lookup-guard

Conversation

@Ajeem-git

Copy link
Copy Markdown
Contributor

Summary:
Prevent a GUI crash when pause, resume, or stop is clicked after the snapshot process has already disappeared on a slow system.

What changed:

  • route snapshot SIGSTOP / SIGCONT / SIGKILL through a guarded helper
  • refresh backup state if the snapshot PID is already gone instead of crashing with ProcessLookupError
  • keep the stop action behavior the same when the process is still alive

Testing:

  • python3.11 -m py_compile qt/app.py

Closes #1604

@buhtz buhtz added the PR: Waiting for review PR won't be merged until review and approval from a member of the maintenance team. label Mar 30, 2026
@buhtz

buhtz commented Mar 30, 2026

Copy link
Copy Markdown
Member

Hello Ajeem,

thank you for your contribution and taking time to improve Back In Time. I appreciate it.

On a quick initial review your PR looks good. I'll review it in detail later.

Please note that currently I have to put all PRs on hold, because the Back In Time code base is in a transition phase. I am rewriting the mounting subsystem from scratch (PR #2449). Since the components are not well isolated, this affects nearly every file. To avoid complex merge conflicts, all other PRs are temporarily on hold.

Best wishes,
Christian

@buhtz buhtz added this to the Upcoming next (2.0.0) milestone Mar 30, 2026
@buhtz

buhtz commented May 25, 2026

Copy link
Copy Markdown
Member

The new mount subsystem is read for testing incl. full gocryptfs support as encfs replacement.

@buhtz buhtz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello Ajeem,

I like your solution and just have some minor suggestions on it.

The big blocking PR was merged, so we can now proceed further with your PRs. I hope you are still with me.

Please note that I have updated your branch. So you have to pull/fetch first.

Regards,
Christian

Comment thread qt/app.py
Comment on lines +1877 to +1879
if not tools.processAlive(pid):
self._update_backup_status(True)
return False

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't have any objects, I suggest to remove that part.
The following try-except-block is enough for this rare case.

Comment thread qt/app.py
Comment on lines +1884 to +1885
logger.debug(
f'Ignoring signal {sig} for vanished snapshot process {pid}.')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for debug output on this event.

@buhtz buhtz added Feedback needs user response, may be closed after timeout without a response PR: Modifications requested Maintenance team requested modifications and waiting for their implementation and removed PR: Waiting for review PR won't be merged until review and approval from a member of the maintenance team. labels Jun 5, 2026
@buhtz

buhtz commented Jun 16, 2026

Copy link
Copy Markdown
Member

Hello Ajeem,

can you please give me a life sign and explain your plans with this PR.

Best,
Christian

@buhtz

buhtz commented Jul 13, 2026

Copy link
Copy Markdown
Member

Hi,

this PR has been inactive for several months. I have provided feedback and suggested changes, but there has been no response or update from your side.

Please be aware that maintaining and completing the proposed changes is the responsibility of the PR author. I will not take over the implementation work.

If you want this PR to be merged, please continue the discussion, address the review comments, and update the PR. Otherwise, I will close this PR without merging it.

Thank you.
Christian

@buhtz
buhtz marked this pull request as draft July 13, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Close after cooling-off period Feedback needs user response, may be closed after timeout without a response PR: Modifications requested Maintenance team requested modifications and waiting for their implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ProcessLookupError with rare combination of start/stop/pause buttons on a slow system

2 participants